

<%@ page import="org.tailor.Measurement" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'measurement.label', default: 'Measurement')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${measurementInstance}">
            <div class="errors">
                <g:renderErrors bean="${measurementInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${measurementInstance?.id}" />
                <g:hiddenField name="version" value="${measurementInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="arm"><g:message code="measurement.arm.label" default="Arm" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'arm', 'errors')}">
                                    <g:textField name="arm" value="${fieldValue(bean: measurementInstance, field: 'arm')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="bicep"><g:message code="measurement.bicep.label" default="Bicep" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'bicep', 'errors')}">
                                    <g:textField name="bicep" value="${fieldValue(bean: measurementInstance, field: 'bicep')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="chest"><g:message code="measurement.chest.label" default="Chest" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'chest', 'errors')}">
                                    <g:textField name="chest" value="${fieldValue(bean: measurementInstance, field: 'chest')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="hip"><g:message code="measurement.hip.label" default="Hip" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'hip', 'errors')}">
                                    <g:textField name="hip" value="${fieldValue(bean: measurementInstance, field: 'hip')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="neck"><g:message code="measurement.neck.label" default="Neck" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'neck', 'errors')}">
                                    <g:textField name="neck" value="${fieldValue(bean: measurementInstance, field: 'neck')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="shirtlength"><g:message code="measurement.shirtlength.label" default="Shirtlength" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'shirtlength', 'errors')}">
                                    <g:textField name="shirtlength" value="${fieldValue(bean: measurementInstance, field: 'shirtlength')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="shoulder"><g:message code="measurement.shoulder.label" default="Shoulder" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'shoulder', 'errors')}">
                                    <g:textField name="shoulder" value="${fieldValue(bean: measurementInstance, field: 'shoulder')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="waist"><g:message code="measurement.waist.label" default="Waist" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'waist', 'errors')}">
                                    <g:textField name="waist" value="${fieldValue(bean: measurementInstance, field: 'waist')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="wrist"><g:message code="measurement.wrist.label" default="Wrist" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'wrist', 'errors')}">
                                    <g:textField name="wrist" value="${fieldValue(bean: measurementInstance, field: 'wrist')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="clientIdClient"><g:message code="measurement.clientIdClient.label" default="Client Id Client" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: measurementInstance, field: 'clientIdClient', 'errors')}">
                                    <g:select name="clientIdClient.id" from="${org.tailor.Client.list()}" optionKey="id" value="${measurementInstance?.clientIdClient?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
